package com.zhouhx.demo.service.impl;


import org.springframework.stereotype.Service;

import com.alibaba.dubbo.common.logger.Logger;
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.config.annotation.Reference;
import com.zhouhx.api.UserService;
import com.zhouhx.demo.service.ConsumerService;
import com.zhouhx.entity.User;

@Service
public class ConsumerServiceImpl implements ConsumerService {
	private static Logger logger = LoggerFactory.getLogger(ConsumerServiceImpl.class);
	/**远程调用*/
	@Reference
	UserService userService;
	@Override
	public String getUserInfo() {
		logger.debug("dubbo远程调用开始。。。。");
		User userInfo = userService.getUserInfo();
		logger.debug("dubbo远程调用结束，res="+userInfo.toString());
		return "当前用户信息"+userInfo == null ? "空":userInfo.toString();
	}
	
	
}
